<?php
/**
 * 控制器
 *
 * @author 孙晓晔
 * @version $Id: index.php 214 2009-09-15 11:05:31Z sunxy $
 */

if (!defined('APP_ROOT')) define('APP_ROOT', dirname(__FILE__));
if (!defined('APP_INC')) define('APP_INC', APP_ROOT . '/../../inc/');
if (!defined('APP_LIB')) define('APP_LIB', APP_ROOT . '/../../lib/');

require_once(APP_ROOT . '/inc/config.php');

$controller = new AdminController();
$controller->import = APP_ROOT . $lib;
$controller->config = APP_ROOT . '/inc';
$controller->application = 'admin';

$controller->left_delimiter = "{[";
$controller->right_delimiter = "]}";

if (empty($_REQUEST['tpl'])) {
	$_REQUEST['tpl'] = 'htm';
}

$_REQUEST['t1'] = urldecode($_REQUEST['t1']);
$_REQUEST['t2'] = urldecode($_REQUEST['t2']);

$controller->execute($_REQUEST);
?>